/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author waiz
 */
public class SumofDatasqr extends Sum {
 
    public static double hitung(Data data){
        sum=0;
        SumofDatasqr.data=data;
        int i=0;
        double[]dta=data.getData();
        while(i<data.getSize()){
            double b=dta[i];
            sum=sum+Math.pow(b,2);
            i++;
        }
        return sum;
    } 
}
